/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sdk.weinxin.beans.kfmessage;

import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;
import sdk.weinxin.beans.message.Article;
import sdk.weinxin.beans.message.News;

/**
 *
 * @author johns
 */
@JsonTypeName(value = NewsKfMessage.TYPE)
public class NewsKfMessage extends KfMessage {

    public static final String TYPE = "news";

    private News news;

    public NewsKfMessage() {
        this.setMsgtype(TYPE);
    }

    public NewsKfMessage(String touser, List<Article> articles) {
        super(touser, TYPE);
        this.news = new News();
        this.news.setArticles(articles);
    }

    public News getNews() {
        return news;
    }

    public void setNews(News news) {
        this.news = news;
    }
}
